package sc.common.stringprocessor;

public class ReplaceStartsWithProcessor implements StringProcessor {

	public ReplaceStartsWithProcessor(String target, String replacement) {
		super();
		this.target = target;
		this.replacement = replacement;
	}

	String target;

	String replacement;

	@Override
	public String process(String str) {
		if (str.startsWith(target)) {
			return str.replaceFirst(target, replacement);
		}
		return str;
	}

}
